From: Ian Jackson Date: Thu, 12 Dec 2013 19:17:03 +0000 (+0000) Subject: libxl: suspend: Apply guest timeout in evtchn case X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5404 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=a03984e7bcdf86c997559416458cc6aebb78e9dd;p=xen.git libxl: suspend: Apply guest timeout in evtchn case When negotiating guest suspend via the evtchn ("fast") protocol, the guest may still fail to respond. So set the timeout. The existing error path will already properly tear down our (event channel) wait. Signed-off-by: Ian Jackson CC: Stefano Stabellini Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 87c994cb6b..36e70b5283 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1081,6 +1081,11 @@ static void domain_suspend_callback_common(libxl__egc *egc, rc = libxl__ev_evtchn_wait(gc, &dss->guest_evtchn); if (rc) goto err; + rc = libxl__ev_time_register_rel(gc, &dss->guest_timeout, + suspend_common_wait_guest_timeout, + 60*1000); + if (rc) goto err; + return; }